#ifndef BEHAVIORSEPARATION_H
#define BEHAVIORSEPARATION_H

#include "Behavior.h"

/**
 * Class BehaviorSeparation
 *
 * This class is used for the seperation behaviour of flocking
 */
class BehaviorSeparation : public Behavior
{
protected:
	/// range of detection.
	float mMinRadius;
	float mMaxRadius;
	float mCosMaxAngle;

public:
	/// Default constructor.
	BehaviorSeparation() :
		Behavior(BEHAVIOR_SEPARATION),
		mMinRadius(0.0f), mMaxRadius(0.0f), mCosMaxAngle(0.0f)
	{}

	/// Default destructor.
	~BehaviorSeparation();
	
	/**
	 * Set the detection range for flocking (if max radius is 0 or less, we skip detection)
		\param minRadius The minimal Radius
		\param maxRadius The maximal Radius
		\param maxAngle The maximal Angle
	 */
	void setDetectionRange(float minRadius, float maxRadius, float maxAngle)
	{
		mMinRadius = minRadius;
		mMaxRadius = maxRadius;
		mCosMaxAngle = Ogre::Math::Cos(maxAngle);
	}

	/// Executes the behavior
	Ogre::Vector3 execute(const BoidBase* boid);
};

#endif // BEHAVIORSEPARATION_H
